home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / tile-for.1 / tile-for / tile-forth-2.1 / src / Makefile < prev    next >
Encoding:
Makefile  |  1991-09-14  |  2.6 KB  |  113 lines

  1. # NAME
  2. #    Makefile - for the tile forth environment
  3. # SYNOPSIS
  4. #    make [option]
  5. # DESCRIPTION
  6. #    General compilation coordinator for the threaded interpreter language
  7. #    environment (TILE). Allow compilation in different modes to simplify
  8. #    program development; compiling, recompiling, debugging, profiling, and
  9. #    benchmarks.
  10. # OPTIONS
  11. #    new
  12. #        Cleans up and compiles a fresh version.
  13. #    opt
  14. #        Use all optimization tricks known by cc.
  15. #    dbx
  16. #        Recompile for debugging with dbx.
  17. #    gprof
  18. #        Recompile for profiling with gprof.
  19. #    lint
  20. #        Verify the source code using lint.
  21. #    bench
  22. #        Some benchmarks to evaluate this threading method
  23. # SEE ALSO
  24. #    make(1), cc(1), touch(1), dbx(1), grof(1), lint(1), time(1)
  25. # AUTHOR
  26. #    Copyright (C) 1990, Mikael R.K. Patel
  27. #    Computer Aided Design Laboratory (CADLAB)
  28. #    Department of Computer and Information Science
  29. #    Linkoping University
  30. #    S-581 83 LINKOPING
  31. #    SWEDEN
  32. #    Email: mip@ida.liu.se
  33. # HISTORY
  34. #    Started on:     01 April 1989
  35. #    Last updated on: 03 September 1990
  36. #
  37.  
  38. # C-compiler 
  39. CC = gcc
  40.  
  41. # Source and object files
  42. SRC = kernel.c io.c error.c memory.c forth.c
  43. VOCS = compiler.v exceptions.v locals.v memory.v queues.v multi-tasking.v string.v float.v
  44. OBJS = kernel.o io.o error.o memory.o
  45. HEADS =  kernel.h io.h error.h memory.h
  46.  
  47. # Template for your machine dependencies and libraries
  48. # LIBS = -lyourlibrary
  49. # CFLAGS = -youroption -DYOURMACHINE
  50.  
  51.  
  52. forth: $(OBJS) forth.o
  53.     $(CC) $(CFLAGS) -o $@ $(OBJS) forth.o $(LIBS)
  54.     mv forth ../bin
  55.  
  56.  
  57. # Object code dependencies
  58. forth.o: $(HEADS)
  59.  
  60. kernel.o: $(HEADS) $(VOCS)
  61.  
  62. memory.o: $(HEADS)
  63.  
  64. error.o:  $(HEADS)
  65.  
  66. io.o:     $(HEADS)
  67.  
  68.  
  69. # Cleans up and compiles a new version
  70. new:
  71.     rm -f *.o
  72.     make forth
  73.  
  74.  
  75. # Compiles with all optimization tricks    
  76. opt:
  77.     rm -f *.o
  78.     make forth "CFLAGS=$(CFLAGS) -O"
  79.  
  80.  
  81. # Compiles for debugging with "dbx" or "dbxtool"
  82. dbx:
  83.     rm -f *.o
  84.     make forth "CFLAGS=$(CFLAGS) -g"
  85.  
  86.  
  87. # Compiles for profiling with "gprof"
  88. gprof: 
  89.     rm -f *.o
  90.     make forth "CFLAGS=$(CFLAGS) -DPROFILE -Bstatic -pg"
  91. #    forth 
  92. #    gprof forth
  93.  
  94. # Verify the source code
  95. lint:
  96.     lint $(CFLAG) -DLINT $(SRC)
  97.  
  98.  
  99. # Run the benchmarks
  100. bench:
  101.     time forth byte-sieve.tst -s byte-sieve
  102.     time forth colburn-sieve.tst -s colburn-sieve
  103.     time forth fibonacci.tst -s recursive-fib
  104.     time forth fibonacci.tst -s tail-recursive-fib
  105.     time forth bubble-sort.tst -s bubble-sort
  106.     time forth bubble-sort.tst -s bubble-sort-with-flag
  107.     time forth tree-sort.tst -s tree-sort
  108.     time forth matrix-mult.tst -s matrix-mult
  109.     time forth permutations.tst -s permutations
  110.     time forth towers-of-hanoi.tst -s towers-of-hanoi
  111.     time forth task-sieve.tst -s task-sieve
  112.     time forth minimal.f83 -s bye
  113.